﻿

Public Class cLocalesNpcText
    Private _Row As SortedList(Of String, sMysqlItem)
    Private _loc As UInt32

    Public Sub New(conn As MySQL, ID As UInt32, loc As UInt32)
        _loc = loc
        If IsNothing(conn) Then Throw New ArgumentNullException("cLocalesNpcText: conn is nothing")
        Dim sql As String = "SELECT ID,text0_0_loc" & loc & ",text0_1_loc" & loc & " FROM locales_npc_text WHERE ID=" & ID & ";"
        _Row = conn.ReadRow(sql)
    End Sub

    Public Property text0_0 As String
        Get
            If _Row.ContainsKey("text0_0_loc" & _loc) Then
                Return _Row.Item("text0_0_loc" & _loc).Value
            End If
            Return ""
        End Get
        Set(value As String)
            Stop
        End Set
    End Property
    Public Property text0_1 As String
        Get
            Return _Row.Item("text0_1_loc" & _loc).Value
        End Get
        Set(value As String)
            Stop
        End Set
    End Property

End Class
